<!--
作者: 陈圳佳
日期: 2015/8/13
时间: 16:14
-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../commons/inc.jsp" %>
<div ng-controller="Edit">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">
            <span aria-hidden="true">&times;</span><span
                class="sr-only">关闭</span>
        </button>
        <h6 class="modal-title">添加客户</h6>
    </div>
    <form class="form-horizontal" role="form" ng-submit="submit()">
        <div class="modal-body">
            <input type="hidden" ng-init="formConfig.action='${ctx}${action}'"/>
            <c:if test="${not empty custom}">
                <input type="hidden" ng-init="formValue.id='${custom.id}'"/>
                <input type="hidden" ng-init="formConfig.method='PUT'"/>
            </c:if>
            <div class="form-group" ng-init="formValue.customName='${custom.customName}'">
                <label class="control-label col-sm-3" for="custom-name">客户名称：</label>

                <div class="col-sm-8">
                    <input type="text" id="custom-name" placeholder="请输入客户名称" class="form-control input-sm"
                           ng-model="formValue.customName" required>
                </div>
            </div>
            <div class="form-group" ng-init="formValue.address='${custom.address}'">
                <label class="control-label col-sm-3" for="address">客户地址：</label>

                <div class="col-sm-8">
                    <input type="text" id="address" placeholder="请输入客户的地址"
                           class="form-control input-sm"
                           ng-model="formValue.address" required>
                </div>
            </div>
            <div class="form-group" ng-init="formValue.contact='${custom.contact}'">
                <label class="control-label col-sm-3" for="contact">联系人：</label>

                <div class="col-sm-8">
                    <input type="text" id="contact" placeholder="请输入联系人"
                           class="form-control input-sm"
                           ng-model="formValue.contact" required>
                </div>
            </div>
            <div class="form-group" ng-init="formValue.tel='${custom.tel}'">
                <label class="control-label col-sm-3" for="tel">联系电话：</label>

                <div class="col-sm-8">
                    <input type="text" id="tel" placeholder="请输入联系电话"
                           class="form-control input-sm"
                           ng-model="formValue.tel" required>
                </div>
            </div>
            <div class="form-group" ng-init="formValue.remark='${custom.remark}'">
                <label class="control-label col-sm-3" for="remark">备注：</label>

                <div class="col-sm-8">
                    <input type="text" id="remark" placeholder="客户的备注"
                           class="form-control input-sm"
                           ng-model="formValue.remark" required>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">保存</button>
        </div>
    </form>
</div>
<script>
    globalObj.callback = function () {
    };
    globalObj.successCall = function (resp) {
    }
</script>